<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
	<head>
		<title>珠海市公共资源交易信息网</title>
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link href="../css/common.css" rel="stylesheet" type="text/css" />
		<link href="../static/css/wsbs.css" rel="stylesheet" type="text/css" />
		<link href="../static/css/jquery-ui-1.8.2.custom.css" rel="stylesheet" type="text/css" media="screen" />
		<link href="../static/css/ui.jqgrid.css" rel="stylesheet" type="text/css" media="screen" />
		<link href="../static/css/ui.jqgrid.modify.jypt.css" rel="stylesheet" type="text/css" media="screen" />
		<script src="../js/jquery-1.9.0.min.js" type="text/javascript"></script>
		<script src="../js/i18n/grid.locale-cn.js" type="text/javascript"></script>
		<script src="../js/jquery.jqGrid.min.js" type="text/javascript"></script>
		<script src="../js/commonInChildPage.js" type=text/javascript></script>
		<style type="text/css">
			#left {width:180px; float:left; background-color:#e6f1fd;}
		</style>
	</head>

	<body>
		<jsp:include page="../include/head.jsp" />
		<div class="position">
			<strong>
				<table id="wypy" width="310" cellspacing="0" cellpadding="0"
					border="0">
					<tbody>
						<tr>
							<td class="xinxin_font" width="170" valign="bottom" height="20"
								align="right">
								本窗口服务星级评定：
							</td>
							<td width="140" valign="center" align="left"
								onmouseover="rate(this,event)">
								<img width="20" src="../images/star_1.png" title="很烂"/>
								<img width="20" src="../images/star_1.png" title="一般"/>
								<img width="20" src="../images/star_1.png" title="还好"/>
								<img width="20" src="../images/star_1.png" title="较好"/>
								<img width="20" src="../images/star_2.png" title="很好"/>
							</td>
						</tr>
					</tbody>
				</table>您现在的位置：</strong>
				<a href="http://wsbs.zhzw.gov.cn/">首 页</a> &gt;
				<a href="http://wsbs.zhzw.gov.cn/wsbs/">网上办事</a> &gt;
				<a href="../index.do">公共资源交易大厅</a>&gt;
				<a href="cgr_index.do">我是采购人</a>&gt;
				我的采购单
		</div>
		<div class="main t10 clearfix">
				<!-- left -->
			<div class="main_l" style="height:580px " >
				<div class="left_nav">
					<div class="left_nav_tit">
						<a href="cgr_index.do">我是采购人</a>
					</div>
					<div class="bar_list">
						<h5>
							<span>我的业务</span>
						</h5>
						<ul id="ChildMenu1">
							<li class="current">
								<a href="cgr_my_buyreg.do" class="nobj">我的采购单</a>
							</li>
							<li>
								<a href="cgr_my_order.do" class="nobj">我的订单</a>
							</li>
							<li>
								<a href="cgr_my_contract.do" class="nobj">我的合同</a>
							</li>
						</ul>
					</div>
					<!-- 
					<div class="bar_list">
						<h5>
							<span>企业简历</span>
						</h5>
						<ul>
							<li>
								<a href="#">基本信息</a>
							</li>
							<li>
								<a href="#">企业资质</a>
							</li>
						</ul>
					</div>
					 -->
				</div>
				<div class="clear"></div>

			</div>
			<!-- left end -->
				<div class="main_r">
			   <div class="right_box"> 
				  <div class="rightbox_tit">我的采购单<input type="submit" name="Submit2" value="我要采购" /></div>
					<div class="d_search">
						采购单编号或名称：<input type="text" size="40" id="noOrName"/>&nbsp;<input type="submit" name="Submit" id="searchButton" value="搜 索" class="input_button_small"/>
					&nbsp;</div>
			     </div>
		</div>
	
			<div class="tbrmain" style="float:right;padding-left:10px">
				<div>
					<table id="projectlist"></table>
					<div id="pprojectlist"></div>
				</div>
			</div>
		</div>
		<jsp:include page="../include/bottom.jsp" />
		<script type="text/javascript">
		jQuery("#projectlist").jqGrid({
			datatype: "json",
			url:"cgr_my_buyreg_data.do",
			jsonReader : {  
		        root:"result",  
		        page: "currentPage",  
		        total: "pageCount",  
		        records: "totalCount"  
		    },  
		height: 'auto',
		width:800,
		rowNum: 15,
		rowList:[5,10,15,20,25,30],
	   	colNames:['采购登记编号','采购登记名称','申购日期','状态','操作','ID'],
	   	colModel:[
	   		{name:'code',index:'code', width:80,align:"center",sortable:false },
	   		{name:'name',index:'name', width:420,align:"center",sortable:false},
	   		//{name:'type',index:'type', width:80,align:"center",sortable:false},
	   		{name:'date',index:'date', width:80,align:"center",sortable:false},
	   		{name:'state',index:'state', width:80,align:"center",sortable:false},
	   		{name:'operation',index:'operation', width:114, align:"center",sortable:false,formatter:formatOper},		
	   		{name:'id',index:'id', width:59,align:"center",sortable:false,hidden:true},	
	   	],
	   	pager: "#pprojectlist",
	   	viewrecords: true,
	   	sortname: 'id',
	   	shrinkToFit:false, 
	   	grouping:true
	   	//,
	   //	groupingView : {
	   //		groupField : ['name'],
		//	groupColumnShow : [false],
		//	groupText : ['<font color=blue>项目名称：{0}</font>']
	   //	}
	});
	
	function formatOper(cellvalue, options, rowObject){
		if(cellvalue == ""){
		
		}else if(cellvalue == ""){
		
		}else  if(cellvalue == ""){
		
		}				
		var returnStr = "<a href='zbgs_jsgc_detail.do?id="+rowObject.id+"' target='_blank'>";
		returnStr +=  ""+"修改" + "</a>";
		return returnStr;
	}
	
	 $(document).ready(function () {
		        $("#searchButton").click(function () {
		            jQuery("#projectlist").jqGrid()
		                .setGridParam({
		                    postData: { noOrName: function () { return encodeURI($("#noOrName").val()); } } 
		                    }).trigger("reloadGrid");
		        });
		    });
		</script>
	</body>
</html>
